﻿<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=Generator content="Microsoft Word 14 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman","serif";}
h1
	{mso-style-link:"标题 1 Char";
	margin-right:0cm;
	margin-left:0cm;
	font-size:24.0pt;
	font-family:宋体;
	font-weight:bold;}
h3
	{mso-style-link:"标题 3 Char";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:173%;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	layout-grid-mode:char;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p
	{margin-right:0cm;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:宋体;}
span.1Char
	{mso-style-name:"标题 1 Char";
	mso-style-link:"标题 1";
	font-family:宋体;
	font-weight:bold;}
span.3Char
	{mso-style-name:"标题 3 Char";
	mso-style-link:"标题 3";
	font-weight:bold;}
 /* Page Definitions */
 @page WordSection1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body bgcolor=white lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal align=center style='margin-top:3.75pt;margin-right:0cm;
margin-bottom:7.5pt;margin-left:0cm;text-align:center'><b><span
style='font-size:15.0pt;font-family:宋体;color:#2686CD'>概述</span></b></p>

<p class=MsoNormal align=left style='text-align:left'><span style='font-family:
宋体;color:#555555;background:white'>一个程序应包括：</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:purple;border:none windowtext 1.0pt;
padding:0cm'>对数据的描述。在程序中要指定数据的类型和数据的组织形式，即数据结构（</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:purple;border:none windowtext 1.0pt;
padding:0cm'>data structure</span><span style='font-family:宋体;color:purple;
border:none windowtext 1.0pt;padding:0cm'>）。</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:purple;border:none windowtext 1.0pt;
padding:0cm'>对操作的描述。即操作步骤，也就是算法（</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:purple;border:none windowtext 1.0pt;padding:0cm'>algorithm</span><span
style='font-family:宋体;color:purple;border:none windowtext 1.0pt;padding:0cm'>）。</span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>Nikiklaus
Wirth</span></b><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>提出的公式：数据结构</span></b><b><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>+</span></b><b><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>算法</span></b><b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>=</span></b><b><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>程序</span></b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>教材认为：</span><b><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>程序</span></b><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>=</span></b><b><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>算法</span></b><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>+</span></b><b><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>数据结构</span></b><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>+</span></b><b><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>程序设计方法</span></b><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>+</span></b><b><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>语言工具和环境</span></b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>这</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>4</span><span style='font-family:宋体;color:#555555;background:white'>个方面是一个程序涉及人员所应具备的知识。本课程的目的是使同学知道怎样编写一个</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>C</span><span style='font-family:宋体;color:#555555;background:white'>程序，进行编写程序的初步训练，因此，只介绍算法的初步知识。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span style='font-family:
宋体;color:#555555;background:white'>做任何事情都有一定的步骤。为解决一个问题而采取的方法和步骤，就称为算法。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>计算机算法：计算机能够执行的算法。</span></b></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>计算机算法可分为两大类：</span></b></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-size:10.0pt;font-family:Wingdings;color:#555555'>§<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>数值运算算法：求解数值；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-size:10.0pt;font-family:Wingdings;color:#555555'>§<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>非数值运算算法：事务管理领域。</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle'><span lang=EN-US style='font-size:12.0pt;font-family:
"Tahoma","sans-serif";color:red;border:none windowtext 1.0pt;padding:0cm'>2.1.1</span><span
style='font-size:12.0pt;font-family:宋体;color:red;border:none windowtext 1.0pt;
padding:0cm'>用自然语言表示算法</span></span></h3>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>除了很简单的问题，一般不用自然语言表示算法。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<br>
</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:red;border:
none windowtext 1.0pt;padding:0cm'>2.1.2</span><span style='font-size:12.0pt;
font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm'>用流程图表示算法</span></span></h3>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>流程图表示算法，直观形象，易于理解。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=257 height=302 src="2.files/image001.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px' alt=用流程图表示算法></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>2.6</span><span style='font-family:宋体;color:#555555;background:white'>】将例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>2.1</span><span style='font-family:宋体;color:#555555;background:white'>求</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>5!</span><span style='font-family:宋体;color:#555555;background:white'>的算用流程图表示。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=428 height=474 src="2.files/image002.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
height:474px;letter-spacing:normal;line-height:22px;list-style-type:none;
margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:
0px;padding-left:0px;padding-right:0px;padding-top:0px;text-indent:0px;
text-transform:none;white-space:normal;width:428px;word-spacing:0px'
alt="将例2.1求5!的算用流程图表示"></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>2.7</span><span style='font-family:宋体;color:#555555;background:white'>】将例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>2.2</span><span style='font-family:宋体;color:#555555;background:white'>的算用流程图表示。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=417 height=473 src="2.files/image003.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px' alt=将例2.2的算用流程图表示></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br>
</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:red;border:
none windowtext 1.0pt;padding:0cm'>2.1.1</span><span style='font-size:12.0pt;
font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm'>三种基本结构和改进的流程图</span></span></h3>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>顺序结构：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=219 height=233 src="2.files/image004.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px' alt=顺序结构></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>选择结构：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=301 height=504 src="2.files/image005.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px' alt="选择结构："></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>循环结构：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=416 height=594 src="2.files/image006.jpg"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px' alt=循环结构></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><strong style='text-decoration:initial'><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'><span
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>三种基本结构的共同特点：</span></span></strong><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555'><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>只有一个入口；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>只有一个出口；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>结构内的每一部分都有机会被执行到；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>结构内不存在</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'>“</span><span
style='font-family:宋体;color:#555555'>死循环</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>”</span><span
style='font-family:宋体;color:#555555'>。</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle;text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:red;border:
none windowtext 1.0pt;padding:0cm'>2.1.1</span><span style='font-size:12.0pt;
font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm'>用</span><span
lang=EN-US style='font-size:12.0pt;font-family:"Tahoma","sans-serif";
color:red;border:none windowtext 1.0pt;padding:0cm'>N-S</span><span
style='font-size:12.0pt;font-family:宋体;color:red;border:none windowtext 1.0pt;
padding:0cm'>流程图表示算法</span></span></h3>

<p style='margin:0cm;margin-bottom:.0001pt;line-height:16.5pt;background:white;
text-decoration:initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>1973</span><span
style='font-size:10.5pt;color:#555555'>年美国学者提出了一种新型流程图：</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>N-S</span><span
style='font-size:10.5pt;color:#555555'>流程图。</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial'>
</span><span style='font-size:10.5pt;color:#555555'>顺序结构：</span><span
lang=EN-US style='font-size:10.5pt;font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial'>
<img width=426 height=557 src="2.files/image007.jpg" style='text-decoration:
initial;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;font-size:14px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px' alt=用N-S流程图表示算法><br style='text-decoration:
initial'>
<img width=428 height=229 src="2.files/image008.jpg" style='text-decoration:
initial;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;font-size:14px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px'><br style='text-decoration:initial'>
&nbsp;</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle;text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:green;
border:none windowtext 1.0pt;padding:0cm'>2.1.1</span><span style='font-size:
12.0pt;font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>用伪代码表示算法</span></span></h3>

<p style='margin:0cm;margin-bottom:.0001pt;line-height:16.5pt;background:white;
text-decoration:initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'><span style='font-size:10.5pt;
color:#555555'>伪代码使用介于自然语言和计算机语言之间的文字和符号来描述算法。</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial'>
&nbsp;</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle;text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:green;
border:none windowtext 1.0pt;padding:0cm'>2.1.2</span><span style='font-size:
12.0pt;font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>用计算机语言表示算法</span></span></h3>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>我们的任务是用计算机解题，就是用计算机实现算法；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>用计算机语言表示算法必须严格遵循所用语言的语法规则。</span></p>

<p style='margin:0cm;margin-bottom:.0001pt;line-height:16.5pt;background:white;
text-decoration:initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial'>
</span><span style='font-size:10.5pt;color:#555555'>【例</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>2.20</span><span
style='font-size:10.5pt;color:#555555'>】求</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>1×2×3×4×5</span><span
style='font-size:10.5pt;color:#555555'>用</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>C</span><span
style='font-size:10.5pt;color:#555555'>语言表示。</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial'>
main()<br style='text-decoration:initial'>
{int i,t;<br style='text-decoration:initial'>
&nbsp;t=1;<br style='text-decoration:initial'>
&nbsp;i=2;<br style='text-decoration:initial'>
&nbsp;while(i&lt;=5)<br style='text-decoration:initial'>
{t=t*i;<br style='text-decoration:initial'>
i=i+1;<br style='text-decoration:initial'>
}<br style='text-decoration:initial'>
&nbsp;printf(“%d”,t);<br style='text-decoration:initial'>
}<br style='text-decoration:initial'>
<br style='text-decoration:initial'>
<br style='text-decoration:initial'>
</span><span style='font-size:10.5pt;color:#555555'>【例</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'>2.21</span><span
style='font-size:10.5pt;color:#555555'>】求级数的值。</span><span lang=EN-US
style='font-size:10.5pt;font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial'>
main()<br style='text-decoration:initial'>
{<br style='text-decoration:initial'>
int sigh=1;<br style='text-decoration:initial'>
float deno=2.0,sum=1.0,term;<br style='text-decoration:initial'>
while(deno&lt;=100)<br style='text-decoration:initial'>
{ sigh= -sigh;<br style='text-decoration:initial'>
term= sigh/ deno;<br style='text-decoration:initial'>
sum=sum+term;<br style='text-decoration:initial'>
deno=deno+1;<br style='text-decoration:initial'>
}<br style='text-decoration:initial'>
&nbsp;printf(“%f”,sum);<br style='text-decoration:initial'>
}<br style='text-decoration:initial'>
<br style='text-decoration:initial'>
&nbsp;</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle;text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:red;border:
none windowtext 1.0pt;padding:0cm'>2.2</span><span style='font-size:12.0pt;
font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm'>结构化程序设计方法</span></span></h3>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>自顶向下；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>逐步细化；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>模块化设计；</span></p>

<p class=MsoNormal align=left style='margin-left:0cm;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>结构化编码。</span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>

</div>

</body>

</html>
